<?php

    $mk=mktime(date("his")); $formulario=$mk;
    $id_vent="vent_".$formulario;
    $anio=date('Y')+1;
    $max=date('d-m-').$anio;
    $this->Vista->ventana('botones',DVENTANA,'DATOS DEL REPORTE','Sigesp/listado_filtrado_reporteador',$formulario,'buscar',0,'810','510',$id_vent);
?>
<div id="<?php echo DVENTANA;?>_2" style="display:none;" class="x-hide-display">
<?php 
    echo $this->Interfaz->formulario($formulario);
    echo $this->Interfaz->filset('Datos del Reporte',0,0,'gray',1);
    echo $this->Interfaz->inputoculto('vent',$id_vent);
?>
    <table border='0' cellpadding='15' cellspacing='15' width='95%' align='center' style="border:5;">
        <tr height='30px' align='center'>
            <td ><b>Tiendas</b></td>
            <td>&nbsp;</td>
            <td align='left'><b>&nbsp;Sentencia SQL</b></td>
    <!--	<td ><b>Titulos Reporte</b></td>-->
        </tr>
        <tr>
            <td rowspan="1"  valign='top' width='150px'>
                <?php
                    $otros=array('value'=>'T001','with'=>'100%','class'=>'selectcolors','empty'=>"",'multiple'=>"multiple");
                    echo $valor=$this->Form->select('tienda', $tienda,$otros);
                ?>
            </td>
            <td>&nbsp;</td>
            <td colspan="2" rowspan="5"  valign='top'><textarea id='sql' name='sql' rows="20" cols="80" style="font-size:10px;" ></textarea></td>
        </tr>
        <tr height='0px'>
            <td class="labeln" valign="top" width='150px'>
                <?php $options = array(1=>array('1' => 'CONSOLIDADO'),2=>array('2' => 'DETALLADO'));?>
                <table border='0'>
                    <tr>
                        <td valign="top">&nbsp;<b>Nombre:</b></td>
                        <td><?php echo $this->Interfaz->input('titulo',22,'todo','inputn',0,50,'',0,0,'titulo del reporte','titulo del reporte')?></td>
                    </tr>
                    <tr>
                        <td valign="top" align="right"><b>Tipo:</b></td>
                        <td><?php echo $this->Interfaz->radio('tipo', $options[1], '1').'Consolidado';?></td>
                    </tr>
                    <tr>
                        <td valign="top">&nbsp;</td>
                        <td><?php echo $this->Interfaz->radio('tipo', $options[2], '1').'Detallado';?></td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr height='0px'  align='center'>
            <td  rowspan="7" id='botones'>&nbsp;<font style="font-size:11px; color:red;">Modulo de consultas, si faltan datos posiblemente se generen errores</font></td>
            <td class="labeln" width='150px' colspan='4' align='center'>&nbsp;</td>
        </tr>
        <tr height='0px'>
            <td class="labeln" valign="top" width='150px'>&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
        <tr height='0px'  align='center'><td>&nbsp;</td>
            <td class="labeln" width='150px' colspan='4' align='center'>&nbsp;</td>
        </tr>
        <tr height='0px'>
            <td class="labeln" valign="top" width='150px'>&nbsp;</td>
            <td>&nbsp;<b>Titulos Reporte</b></td>
        </tr>
        <tr height='0px' align='center'>
            <td>&nbsp;</td>
            <td class="labeln" width='150px' colspan='4' align='center'><textarea id='nombres' name='nombres' rows="1" cols="60"></textarea></td>
        </tr>
        <tr height='0px'>
            <td class="labeln" valign="top" width='150px'>&nbsp;</td>
            <td>&nbsp;<b>Columnas Agrupar</b></td>
        </tr>
        <tr height='0px' align='center'>
            <td>&nbsp;</td>
            <td class="labeln" width='150px' colspan='4' align='center'><textarea id='agrupar' name='agrupar' rows="1" cols="60"></textarea></td>
        </tr>
    </table><br />
<?php echo $this->Interfaz->filset();?>
    </form>
</div>